package com.ruoyi.nwbd.domain.bo;

import com.baomidou.mybatisplus.annotation.TableField;
import com.ruoyi.common.core.validate.AddGroup;
import com.ruoyi.common.core.validate.EditGroup;
import com.ruoyi.common.jackson.JsonTypeHandler;
import lombok.Data;
import lombok.EqualsAndHashCode;
import javax.validation.constraints.*;

import com.ruoyi.common.core.domain.BaseEntity;

/**
 * 个人信息业务对象 person
 *
 * @author syc
 * @date 2025-04-04
 */

@Data
@EqualsAndHashCode(callSuper = true)
public class PersonBo extends BaseEntity {

    /**
     * 主键
     */
    @NotNull(message = "主键不能为空", groups = { EditGroup.class })
    private Long id;

    /**
     * 姓名
     */
    @NotBlank(message = "姓名不能为空", groups = { AddGroup.class, EditGroup.class })
    private String name;

    /**
     * 年龄
     */
    @NotNull(message = "年龄不能为空", groups = { AddGroup.class, EditGroup.class })
    private Long age;

    /**
     * 性别（男、女、未知）
     */
    @NotBlank(message = "性别（男、女、未知）不能为空", groups = { AddGroup.class, EditGroup.class })
    private String sex;

    /**
     * 个人信息详情
     */
    @NotBlank(message = "个人信息详情不能为空", groups = { AddGroup.class, EditGroup.class })
    @TableField(typeHandler = JsonTypeHandler.class)
    private String infoDetail;


}
